import request from '@/utils/request'

export default {
  getDebentureByCode(page, limit, debentureCode) {
    return request({
      url: `/admin/getDebentureByCode/${page}/${limit}/${debentureCode}`,
      method: 'get'
    })
  },
  page(page, limit) {
    return request({
      url: `/admin/getDebentureByCode/${page}/${limit}`,
      method: 'get'
    })
  },
  find(id) {
    return request({
      url: `/admin/find/${id}`,
      method: 'get'
    })
  },
  save(financialInstruments) {
    return request({
      url: `/admin/saveDebenture`,
      method: 'post',
      data: financialInstruments
    })
  },
  pageByAccount(page, limit, account) {
    return request({
      url: `/admin/findByAccount/${page}/${limit}/${account}`,
      method: 'get'
    })
  },
  select(id, configurationId) {
    return request({
      url: `/admin/select/${id}/${configurationId}`,
      method: 'get'
    })
  },
  getDebentureByCodeAndAccount(page, limit, debentureCode, account) {
    return request({
      url: `/admin/getDebentureByCodeAndAccount/${page}/${limit}/${debentureCode}/${account}`,
      method: 'get'
    })
  },
  deleteOne(id) {
    return request({
      url: `/admin/deleteOne/${id}`,
      method: 'get'
    })
  }
}
